package com.ruoyi.papercustomeranswer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.papercustomeranswer.mapper.ExamPaperQuestionCustomerAnswerMapper;
import com.ruoyi.papercustomeranswer.domain.ExamPaperQuestionCustomerAnswer;
import com.ruoyi.papercustomeranswer.service.IExamPaperQuestionCustomerAnswerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 题目具体答题信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-25
 */
@Service
public class ExamPaperQuestionCustomerAnswerServiceImpl implements IExamPaperQuestionCustomerAnswerService 
{
    @Autowired
    private ExamPaperQuestionCustomerAnswerMapper examPaperQuestionCustomerAnswerMapper;

    /**
     * 查询题目具体答题信息
     * 
     * @param id 题目具体答题信息主键
     * @return 题目具体答题信息
     */
    @Override
    public ExamPaperQuestionCustomerAnswer selectExamPaperQuestionCustomerAnswerById(Long id)
    {
        return examPaperQuestionCustomerAnswerMapper.selectExamPaperQuestionCustomerAnswerById(id);
    }

    /**
     * 查询题目具体答题信息列表
     * 
     * @param examPaperQuestionCustomerAnswer 题目具体答题信息
     * @return 题目具体答题信息
     */
    @Override
    public List<ExamPaperQuestionCustomerAnswer> selectExamPaperQuestionCustomerAnswerList(ExamPaperQuestionCustomerAnswer examPaperQuestionCustomerAnswer)
    {
        return examPaperQuestionCustomerAnswerMapper.selectExamPaperQuestionCustomerAnswerList(examPaperQuestionCustomerAnswer);
    }

    /**
     * 新增题目具体答题信息
     * 
     * @param examPaperQuestionCustomerAnswer 题目具体答题信息
     * @return 结果
     */
    @Override
    public int insertExamPaperQuestionCustomerAnswer(ExamPaperQuestionCustomerAnswer examPaperQuestionCustomerAnswer)
    {
        examPaperQuestionCustomerAnswer.setCreateTime(DateUtils.getNowDate());
        return examPaperQuestionCustomerAnswerMapper.insertExamPaperQuestionCustomerAnswer(examPaperQuestionCustomerAnswer);
    }

    /**
     * 修改题目具体答题信息
     * 
     * @param examPaperQuestionCustomerAnswer 题目具体答题信息
     * @return 结果
     */
    @Override
    public int updateExamPaperQuestionCustomerAnswer(ExamPaperQuestionCustomerAnswer examPaperQuestionCustomerAnswer)
    {
        return examPaperQuestionCustomerAnswerMapper.updateExamPaperQuestionCustomerAnswer(examPaperQuestionCustomerAnswer);
    }

    /**
     * 批量删除题目具体答题信息
     * 
     * @param ids 需要删除的题目具体答题信息主键
     * @return 结果
     */
    @Override
    public int deleteExamPaperQuestionCustomerAnswerByIds(String ids)
    {
        return examPaperQuestionCustomerAnswerMapper.deleteExamPaperQuestionCustomerAnswerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除题目具体答题信息信息
     * 
     * @param id 题目具体答题信息主键
     * @return 结果
     */
    @Override
    public int deleteExamPaperQuestionCustomerAnswerById(Long id)
    {
        return examPaperQuestionCustomerAnswerMapper.deleteExamPaperQuestionCustomerAnswerById(id);
    }
}
